package com.qys.livesMall.security.interceptor.configuration;


import com.qys.livesMall.security.interceptor.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

@Configuration
public class BeanBuilder {

    @Bean
    public RequestInterceptor requestInterceptor() {
        return  new RequestInterceptor();
    }


    @Bean
    public LoginInterceptor loginInterceptor() {
        return new LoginInterceptor();
    }

    @Bean
    public ThreadInterceptor threadInterceptor() {
        return new ThreadInterceptor();
    }

    @Bean
    public SecurityInterceptor securityInterceptor() {
        return  new SecurityInterceptor();
    }

//    @Bean
//    public IpInterceptor ipInterceptor() {
//        return  new IpInterceptor();
//    }

    @Bean
    public WordsInterceptor wordsInterceptor() {
        return  new WordsInterceptor();
    }


    @Bean
    public PasswordEncoder passwordEncoder() {
        return new BCryptPasswordEncoder();
    }

}
